<template>
	<div>
		<NuxtPage></NuxtPage>
	</div>
</template>

<script setup>
	// 方式一: 创建创建
	const nuxtApp = useNuxtApp()
	nuxtApp.provide('formatDate', () => {
		return '2020-12-14'
	})

	nuxtApp.provide('version', '1.0.0')

	if (process.client) {
		console.log(nuxtApp.$formatDate(), nuxtApp.$version, nuxtApp.$formatPrice(20))
	}
</script>
